<script>
	import service from 'service.js';
	export default {
		onLaunch: function() {
			console.log('App Launch')
			 //#ifdef APP-PLUS  
			   //检查更新地址  
				 console.log(plus.runtime.versionCode);
				 console.log(plus.runtime.version);
			    uni.request({  
					method: 'POST',
			       url: service.BaseUrl+'api/apiAdmin/update',
			        data: { //升级检测数据  
			        appid: plus.runtime.appid,  
			        version: plus.runtime.version  ,
					versionCode:plus.runtime.versionCode,
			    },  
			        success: res => {  
						console.log(res.data);
			            if (res.statusCode == 200 && res.data.Code === 1) {  
							uni.showModal({ //提醒用户更新  
			                    title: "更新提示",  
			                    content: res.data.Msg,  
			                    success: function (rmd)  {  
			                        if (rmd.confirm) {  
			                            plus.runtime.openURL(res.data.Data);  
			                        }  
			                    }  
			                })  
			            }  
			        }  
			    })  
			    //#endif  
			
			
			
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
 @import "common/uni.css";
	@import "colorui/main.css";
	@import "colorui/icon.css";
	/*每个页面公共css */
	@font-face {
		 	font-family: 'iconfont';
		 	font-weight: normal;
		 	font-style: normal;
		 	src: url('~@/static/iconfont.ttf') format('truetype');
		 }
		 
		   .icos {
		         font-family: iconfont;
		         margin-left: 20rpx;
		     }

	/*每个页面公共css */
	

	

</style>
